<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class DocumentoM extends CI_Model {

    public function __construct() {
        $this->load->database();
    }

    public function obtenerDocumentos() {
        $query = "SELECT * FROM documento WHERE id_establecimiento='" . $_SESSION["establecimiento"]["id_establecimiento"] . "' ORDER BY nombre";
        return $this->db->query($query)->result();
    }

}